home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / clang / nn.zip / M-XENIX3.H < prev    next >
C/C++ Source or Header  |  1989-07-11  |  2KB  |  77 lines

  1. /************** Machine (and compiler) dependent definitions. **************
  2.  *
  3.  *    This file is for XENIX 386.
  4.  */
  5.  
  6.  
  7.  
  8. /*      MACHINE TYPE    DEFINED TYPE        VALUE RANGE    */
  9.  
  10. typedef unsigned char    int8;        /*        0 ..     255 */
  11. typedef short        int16;        /*  -10,000 ..  10,000 */
  12. typedef long        int32;        /* -100,000 .. 100,000 */
  13. typedef unsigned long    uint32;        /*       0 ..  2^31-1 */
  14.  
  15.  
  16. /*
  17.  *     Define NO_VARARGS if the varargs feature is not available
  18.  *
  19.  *    Also define NO_VARARGS if the vprintf/vsprintf routines are not
  20.  *    available (however, this will only by safe on some machines, like
  21.  *    the VAX).
  22.  *    
  23.  */
  24.  
  25. /* #define NO_VARARGS */
  26.  
  27. /*
  28.  *    Define STRCSPN if the strcspn() function is not available.
  29.  */
  30.  
  31. /* #define STRCSPN     /* */
  32.  
  33. /*
  34.  *    Define NO_SIGINTERRUPT on BSD based systems which don't have
  35.  *    a siginterrupt() function, but provides an SV_INTERRUPT flag
  36.  *    in <signal.h>.
  37.  */
  38.  
  39. /* #define NO_SIGINTERRUPT    /* */
  40.  
  41.  
  42. #ifdef NETWORK_DATABASE
  43.  
  44. /*
  45.  *    Define NETWORK_BYTE_ORDER if the machine's int32's are
  46.  *    already in network byte order, i.e. m68k based.
  47.  */
  48.  
  49. #undef NETWORK_BYTE_ORDER    /* */
  50.  
  51. YOU LOSE -- I DON'T KNOW HOW TO DO THIS ON XENIX 386
  52.  
  53. /*
  54.  *    OTHERWISE provide the functions/macros ntohl/htonl to
  55.  *    convert longs from and to network byte order
  56.  */
  57.  
  58. /*
  59.  * Include appropriate files or define macroes or functions (include them 
  60.  * in data.c) to convert longs and shorts to and from network byte order.
  61.  */
  62.  
  63. /*
  64.  * This will work on most BSD based systems...
  65.  */
  66.  
  67. #include <netinet/in.h>
  68.  
  69. /*
  70.  * Otherwise, define something appropriate below
  71.  */
  72.  
  73. #define htonl(l)    ...    /* host long to network long */
  74. #define ntohl(l)    ...    /* network long to host long */
  75.  
  76. #endif    /* NETWORK DATABASE */
  77.